<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">

    <title>登录信息修改</title>

    <link rel="stylesheet" href="/static/css-lib/bootstrap.min.css" />

    <style>
        .btn-margin {
            margin-left: 15px;
            margin-bottom: 10px;
        }

        #accordion {
            margin-top: 10px;
        }

        .alert-box {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,.4);
            z-index: 998;
        }

        .alert-container {
            position: absolute;
            left: 50%;
            top: 10%;
            z-index: 999;
            transform: translate(-50%);
            -webkit-transform: translate(-50%);
        }
    </style>
</head>
<body>
    <div class="container-fluid">
        <div class="panel-group" id="accordion">

            <!-- 登录名修改 -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#userLoginName">
                            登录名修改
                        </a>
                    </h4>
                </div>
                <div id="userLoginName" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <form role="form">
                            <div class="input-group">
                                <span class="input-group-addon">原用户名</span>
                                <input type="text" class="form-control" value="<c:out value="${AdminInfo.name}" />" disabled>
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">新用户名</span>
                                <input id="userName" type="text" class="form-control">
                            </div>
                        </form>
                    </div>

                    <button id="alterUserName" type="button" class="btn btn-default btn-margin">修改</button>
                </div>
            </div>

            <!-- 登录密码修改 -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#loginPassword">
                            登录密码修改
                        </a>
                    </h4>
                </div>
                <div id="loginPassword" class="panel-collapse collapse">
                    <div class="panel-body">
                        <form role="form">
                            <div class="input-group">
                                <span class="input-group-addon">新密码</span>
                                <input id="password1" type="password" class="form-control" autocomplete="off">
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">确认新密码</span>
                                <input id="password2" type="password" class="form-control" autocomplete="off">
                            </div>
                        </form>
                    </div>

                    <button id="alterPassword" type="button" class="btn btn-default btn-margin">修改</button>
                </div>
            </div>

            <!-- 手机号修改 -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#userPhone">
                            手机号修改
                        </a>
                    </h4>
                </div>
                <div id="userPhone" class="panel-collapse collapse">
                    <div class="panel-body">
                        <form role="form">
                            <div class="input-group">
                                <span class="input-group-addon">原手机号</span>
                                <input type="text" class="form-control" value="<c:out value="${AdminInfo.phone}" />" disabled>
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">新手机号</span>
                                <input id="phoneNum" type="text" class="form-control">
                            </div>
                            <br/>
                            <div class="row">
                                <div class="col-xs-8 col-sm-6 col-md-6 col-lg-6">
                                    <div class="input-group">
                                        <span class="input-group-addon">图片验证码</span>
                                        <input id="picCode" type="text" class="form-control">
                                    </div>
                                </div>
                                <div class="col-xs-3 col-sm-6 col-md-6 col-lg-6">
                                    <img id="imgPic" src="/utils/imageAuthCode" alt="图片验证码">
                                </div>
                            </div>
                            <br/>
                            <div class="row">
                                <div class="col-xs-8 col-sm-6 col-md-6 col-lg-6">
                                    <div class="input-group">
                                        <span class="input-group-addon">短信验证码</span>
                                        <input id="smsCode" type="text" class="form-control">
                                    </div>
                                </div>
                                <div class="col-xs-3 col-sm-6 col-md-6 col-lg-6">
                                    <button id="getSmsCode" type="button" class="btn btn-default">获取验证码</button>
                                </div>
                            </div>
                        </form>
                    </div>

                    <button id="alterPhone" type="button" class="btn btn-default btn-margin">修改</button>
                </div>
            </div>

            <!-- 邮箱号修改 -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#email">
                            邮箱号修改
                        </a>
                    </h4>
                </div>
                <div id="email" class="panel-collapse collapse">
                    <div class="panel-body">
                        <form role="form">
                            <div class="input-group">
                                <span class="input-group-addon">原邮箱号</span>
                                <input type="text" class="form-control" value="<c:out value="${AdminInfo.email}" />" disabled>
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">新邮箱号</span>
                                <input id="emailNum" type="text" class="form-control">
                            </div>
                        </form>
                    </div>

                    <button id="alterEmail" type="button" class="btn btn-default btn-margin">修改</button>
                </div>
            </div>

        </div>

        <!-- 错误提示框 -->
        <div id="errorBox" class="alert-box hidden">
            <div class="alert alert-danger alert-dismissable alert-container">
                <button id="closeError" type="button" class="close" data-dismiss="alert" aria-hidden="true">
                    &times;
                </button>
                <span id="errorArea"></span>
            </div>
        </div>

        <!-- 成功提示框 -->
        <div id="successBox" class="alert-box hidden">
            <div class="alert alert-info alert-dismissable alert-container">
                <button id="closeSuccess" type="button" class="close" data-dismiss="alert" aria-hidden="true">
                    &times;
                </button>
                修改成功，<span id="second">3</span>后自动刷新...
            </div>
        </div>
    </div>

    <script src="/static/js-lib/jquery-3.4.1.min.js"></script>
    <script src="/static/js-cus/admin/Frame-UpdateLoginInfo.js"></script>
</body>
</html>